# 列表
# items1 = [35, 12, 99, 68, 55, 35, 87]
# items2 = ['Python', 'Java', 'Go', 'Kotlin']
# items3 = [100, 12.3, 'Python', True]
#
# print(type(items1))
#
# items4 = list(range(1, 10))
# items5 = list('hello')
# print(type(items4))
#
# items5 = [35, 12, 99, 45, 66]
# items6 = [45, 58, 29]
# items7 = ['Python', 'Java', 'JavaScript']
#
# print(items5 + items6)  # [35, 12, 99, 45, 66, 45, 58, 29]
# print(items6 + items7)  # [45, 58, 29, 'Python', 'Java', 'JavaScript']
# print(35 in items5) # True
# items8 = ['apple', 'waxberry', 'pitaya', 'peach', 'watermelon']
# print(items8)   # apple
# print(items8[-1])
# print(items8[-1:-4:-2]) # 同样就是start += stride
# items7[1:3] = ['x', 'o']
# print(items7) # ['Python', 'x', 'o']
# languages = ['Python', 'Java', 'C++', 'Kotlin']
# # 1
# for i in languages:
#     print(i)
# # 2
# for i in range(len(languages)):
#     print(languages[i])
import random

languages = ['Python', 'SQL', 'Java', 'C++', 'JavaScript', 'Python']
languages.remove('Python')
# temp = languages.pop(1)
# languages.append(temp)
# languages.clear()
print(languages)
items = ['Python', 'Java', 'C++', 'Kotlin', 'Swift']
itemsnum = ['1', '2', '3', '5', '4']
itemsnum.sort()

items.sort()
print(items)  # ['C++', 'Java', 'Kotlin', 'Python', 'Swift']
print(itemsnum)
items.reverse()
print(items)  # ['Swift', 'Python', 'Kotlin', 'Java', 'C++'
items = [i for i in range(1, 100) if i % 3 == 0 or i % 5 == 0]
print(items)
scores = []
# stuNum = int(input('输入你添加同学的位数'))
#
# for i in range(stuNum):
#     scores.append([])
#     for _ in range(3):
#         g = int(input('输入成绩'))
#         scores[i].append(g)
random.randrange(61, 100)
scores = [[random.randrange(61, 100) for _ in range(3)] for _ in range(1, 7)]
print(scores)
